import { NavBar } from 'antd-mobile'
import { useNavigate } from 'react-router-dom'
import styles from '../css/navbar.module.css'

function MyNavBar(props) {
  const nav = useNavigate()

  return (
    <div className={styles.box}>
      <NavBar onBack={() => nav(-1)}>{props.title}</NavBar>
    </div>
  )
}

export default MyNavBar
